<include file="public@head"/>

<div class="jubao-page">
    <div class="wrap-box">
        <div class="jubao-container">
            <div class="jubao-nav">
                <ul class="list-style">
                    <li class="step1">
                        <a href="{:cmf_url('portal/jubao/index')}">

                        <img src="/static/xiaogu/images/jubao_step1.png" alt="">
                        </a>
                    </li>
                    <li class="step2">
                        <a href="{:cmf_url('portal/list/index',array('id'=>13))}">

                        <img src="/static/xiaogu/images/jubao_step2.png" alt="">
                        </a>
                    </li>
                    <li class="step3">
                        <a href="{:cmf_url('portal/jubao/query')}">

                        <img src="/static/xiaogu/images/jubao_step3.png" alt="">
                        </a>
                    </li>
                </ul>
                <div class="c"></div>
            </div>

            <div class="line"></div>



            <div id="step2" class="jubao-table jubao-query">
                <ul class="list-style">

                    <li class="jubao-full odd">举报人查询</li>
                    <li class="jubao-query-area odd">
                        <div class="user">
                            <span>查询码：</span><input type="text" name="query_code" id="query_code" class="small-input">
                            <span>验证码：</span>
                            <input type="text" name="verify_code" id="verify_code" class="small-input">
                            <span><img src="{:captcha_src()}" id="captcha" width="120" height="40" onclick="this.src=this.src+'?'+Math.random()" alt="captcha" /></span>
                            <button class="jubao-btn" id="query">查询</button>
                        </div>

                    </li>

                    <li>
                        <span>答复内容</span>

                    </li>

                    <li class="jubao-detail odd">

                        <div class="content">

                            <textarea name="content" class="jubao-content" id="reply"></textarea>
                        </div>
                    </li>

                </ul>
                <div class="c"></div>
            </div>
            <div class="c"></div>

        </div>
    </div>
</div>

<include file="public@footer"/>

<script>
    function query() {
        $.get("{:cmf_url('portal/jubao/doQuery')}", {code : $("#query_code").val(), verify_code: $("#verify_code").val()}, function(data) {
            $("#captcha").click();
            if(data.code == 1) {
                // 查询成功
                var res = data.data;
                if(res.reply_content == '') {
                    alert('暂未回复');
                }else {
                    $("#reply").val(res.reply_content)
                }

            } else {
                alert(data.msg);
            }
        });
    }

    $("#query").click(function() {
        query();
    })
</script>
</body>

</html>